package com.example.thegreatwall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "`comment`")
public class Comment {
    /**
     * 评论id
     */
    @TableId(value = "comment_id", type = IdType.INPUT)
    private Integer id;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 0-正常 1-匿名
     */
    @TableField(value = "`status`")
    private Integer status;

    /**
     * 评论内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 1-5分，用户评分
     */
    @TableField(value = "score")
    private BigDecimal score;

    /**
     * 创建时间
     */
    @TableField(value = "create_at")
    private Date createAt;

    /**
     * 0-单个商品 1-组合套餐
     */
    @TableField(value = "product_type")
    private Integer productType;

    /**
     * 商品id
     */
    @TableField(value = "product_id")
    private Integer productId;

    /**
     * 评论图片
     */
    @TableField(value = "comment_img")
    private String commentImg;

    @TableField(exist = false)
    private Users user;

}